package com.enqualcomm.kids.mvp.pedometer;

public class PedometerUtils {
	
	public static float getCalorie(int height,int weight,int stepCount){
		if (stepCount==0) {
			return 0;
		}
		float colorie = (0.53f*height+0.58f*weight+0.04f*stepCount)-135;
		colorie = ((int)(colorie*10))/10f;

		return colorie<=0 ? 0.1f : colorie;
	}

	
	public static float getDistance(float height,int stepCount){
		if (height<154) {
			return (stepCount*height*16/42 + height/7)/100000;
		}else if(height>174){
			return (stepCount*height*17/42 + height/7)/100000;
		}else {
			// 154<?<174
			return (stepCount*height*11/28 + height/7)/100000;
		}
	}
	
}
